<include file="Public/header"/>
<div class="wrapper m-t">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5 class="text-info"><i class="fa fa-list"></i> 货品库存列表 </h5>
        </div>

        <div class="ibox-content">
            <div class="table-responsive">
                <table class="table table-striped table-hover">
                    <thead>
                    <tr>
                        <th>编号</th>
                        <th>名称</th>
                        <th>规格</th>
                        <th>进价</th>
                        <th>售价价</th>
                        <th>条形码</th>
                        <th>数量</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <volist name="_list" id="vo" key="k">
                        <tr>
                            <td>{$vo.m_number}</td>
                            <td>{$vo.m_name}</td>
                            <td>{$vo.standard}</td>
                            <td>{$vo.bid_price}</td>
                            <td>{$vo.sell_price}</td>
                            <td>{$vo.bracode}</td>
                            <td>{$vo.counts}</td>
                            <input type="hidden" value='{:json_encode($vo)}' id="ms{$k}">
                            <td>
                                <a data-toggle="modal" onclick="huopin({$k})" data-target="#model">
                                    <button class="btn btn-primary btn-xs">
                                        <i class="fa fa-file-text"></i> 详情
                                    </button>
                                </a>

                            </td>
                        </tr>
                    </volist>
                    </tbody>
                </table>
                <div class="page">{$_page}</div>
            </div>
        </div>
    </div>
</div>
<!--物品详情弹框-->
<div class="modal inmodal" id="model" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content animated bounceInRight">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">
                    <span aria-hidden="true">&times;</span>
                    <span class="sr-only">关闭</span>
                </button>
                <h3 class="font-bold text-success">货品库存详情</h3>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label class="col-lg-2 control-label text-right">名称：</label>

                    <div class="col-lg-4 no-padding" id="m_name"></div>
                    <label class="col-lg-2 control-label text-right">商品编码：</label>

                    <div class="col-lg-4 no-padding" id="m_number"></div>
                    <div class="clearfix"></div>
                </div>
                <div class="form-group">
                    <label class="col-lg-2 control-label text-right">条形编码：</label>

                    <div class="col-lg-4 no-padding" id="bracode"></div>
                    <label class="col-lg-2 control-label text-right">规格：</label>

                    <div class="col-lg-4 no-padding" id="standard"></div>
                    <div class="clearfix"></div>
                </div>
                <div class="form-group">
                    <label class="col-lg-2 control-label text-right">颜色：</label>

                    <div class="col-lg-4 no-padding" id="color"></div>
                    <label class="col-lg-2 control-label text-right">形态：</label>

                    <div class="col-lg-4 no-padding">木材</div>
                    <div class="clearfix"></div>
                </div>
                <div class="form-group">
                    <label class="col-lg-2 control-label text-right">进价：</label>

                    <div class="col-lg-4 no-padding" id="bid_price"></div>
                    <label class="col-lg-2 control-label text-right">售价：</label>

                    <div class="col-lg-4 no-padding" id="sell_price">木材</div>
                    <div class="clearfix"></div>
                </div>
                <div class="form-group">
                    <label class="col-lg-2 control-label text-right">保质期：</label>

                    <div class="col-lg-4 no-padding" id="expiration_date"></div>
                    <label class="col-lg-2 control-label text-right">仓储仓位：</label>

                    <div class="col-lg-4 no-padding" id="s_name"></div>
                    <div class="clearfix"></div>
                </div>
                <div class="form-group">

                    <label class="col-lg-2 control-label text-right">供应商：</label>

                    <div class="col-lg-4 no-padding" id="supplier"></div>
                    <label class="col-lg-2 control-label text-right">联系人：</label>

                    <div class="col-lg-4 no-padding" id="linkman"></div>
                    <div class="clearfix"></div>
                </div>
                <div class="form-group">

                    <label class="col-lg-2 control-label text-right">备注：</label>

                    <div class="col-lg-4 no-padding" id="remark"></div>
                    <label class="col-lg-2 control-label text-right">数量：</label>

                    <div class="col-lg-4 no-padding" id="put_count"></div>
                    <div class="clearfix"></div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-info" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
<!--物品详情弹框 endif-->
<include file="Public/footer"/>
<script>
    function huopin(vo) {
        var arr = $("#ms" + vo).val();
        var obj = eval('(' + arr + ')');
        $("#m_name").html(obj.m_name);
        $("#m_number").html(obj.m_number);
        $("#bracode").html(obj.bracode);
        $("#standard").html(obj.standard);
        $("#color").html(obj.color);
        $("#bid_price").html(obj.bid_price);
        $("#sell_price").html(obj.sell_price);
        $("#expiration_date").html(obj.expiration_date);
        $("#s_name").html(obj.s_name);
        $("#supplier").html(obj.supplier);
        $("#linkman").html(obj.linkman);
        $("#remark").html(obj.remark);
        $("#put_count").html(obj.counts);
    }
</script>






